package com.whq.knowverywell.util.httpclient;


import com.whq.knowverywell.util.constant.ErrorCodeConstant;

public class HttpResult {
    private int code = 0;
    private String resp = "";

    public HttpResult(int code) {
        super();
        this.code = code;
    }
    public HttpResult(int code, String resp) {
        super();
        this.code = code;
        this.resp = resp;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getResp() {
        return resp;
    }

    public void setResp(String resp) {
        this.resp = resp;
    }
    
    @Override
    public String toString() {
        return "code["+code+"],resp["+resp+"]";
    }
    
    public boolean checkCode(){
        return code == ErrorCodeConstant.ERR_CODE_SUCCESS;
    }
}